////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011-2012 www.iflytek.com. All Rights Reserved.
//  This software for customer relationship management system, developed by Iflytek_ZY team.
//  Software code and design for the team, copy rights reserved.
////////////////////////////////////////////////////////////////////////////////

package com.iflytek.ci.qams.service.impl;

import com.iflytek.ci.qams.service.LabelService;
import com.iflytek.ci.qams.dao.LabelDao;
import org.springframework.beans.factory.annotation.Autowired;
import com.iflytek.ci.qams.domain.Label;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created with IntelliJ IDEA. User: Administrator Date: 12-11-9 Time: 下午3:38 To
 * change this template use File | Settings | File Templates.
 */
@Service("LabelService")
@Transactional(readOnly = true, isolation = Isolation.READ_UNCOMMITTED)
public class LabelServiceImpl implements LabelService {
	@Autowired
	private LabelDao labelDao;

	@Override
	public List<Label> all_labels() {
		return labelDao.issue_labels();
	}

	@Override
	public Label getLabelById(int id) {
		return labelDao.issue_label_with_id(id);
	}

	@Override
	public Label getLabelByIssueId(long issue_id) {
		return labelDao.getByIssueId(issue_id);
	}

}
